package com.yazi.mxz.common.entity.beans;

import com.myframework.smhj.hibernate.Entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * StoreGoods entity. @author MyEclipse Persistence Tools
 */
@javax.persistence.Entity
@Table(name = "MXZ_STORE_GOODS", schema = "HCD_DEV")
public class StoreGoods extends Entity implements java.io.Serializable {

	// Fields

	private Long storeGoodsId;
	private Category category;
	private GoodsClassify goodsClassify;
	private Goods goods;
	private Store store;
	private String barCode;
	private String name;
	private String title;
	private String subTitle;
	private String keywords;
	private String categoryPath;
	private Integer status;
	private Boolean atDiscount;
	private Boolean atDiscountLocal;
	private Boolean atGift;
	private Boolean atGiftLocal;
	private String unit;
	private Float selfCost;
	private Float price;
	private Float stock;
	private String sellUnit;
	private Double unitConvert;
	private Float stockConvert;
	private Integer stockEnd;
	private Float sellDef;
	private Float sellMin;
	private Float sellExt;
	private Float originalPrice;
	private String pic;
	private String dispatch;
	private Integer dealAll;
	private Integer dealWeek;
	private Integer dealMonth;
	private Long dealTime;
	private Long sort;
	private String description;
	private Long updateTime;
	private Long addTime;
	private Set<GoodsPromote> goodsPromotes = new HashSet<GoodsPromote>(0);
	private Set<GoodsGift> goodsGiftsForSellId = new HashSet<GoodsGift>(0);
	private Set<StoreRestockGoods> storeRestockGoodses = new HashSet<StoreRestockGoods>(0);
	private Set<StoreGoodsPic> storeGoodsPics = new HashSet<StoreGoodsPic>(0);
	private Set<Shopping> shoppings = new HashSet<Shopping>(0);
	private Set<LocalSaleGoods> localSaleGoodses = new HashSet<LocalSaleGoods>(0);
	private Set<GoodsGift> goodsGiftsForGiftId = new HashSet<GoodsGift>(0);
	private Set<StoreGift> storeGifts = new HashSet<StoreGift>(0);
	private Set<GoodsStandard> goodsStandards = new HashSet<GoodsStandard>(0);

	// Constructors

	/** default constructor */
	public StoreGoods() {
	}

	/** minimal constructor */
	public StoreGoods(Category category, GoodsClassify goodsClassify, Goods goods, Store store,
			String barCode, String name, String title, String categoryPath, Integer status,
			Boolean atDiscount, Boolean atDiscountLocal, Boolean atGift, Boolean atGiftLocal,
			String unit, Float selfCost, Float price, Float stock, Float stockConvert,
			Integer stockEnd, Float sellDef, Float sellMin, Float sellExt, Float originalPrice,
			Integer dealAll, Integer dealWeek, Integer dealMonth, Long dealTime, Long sort,
			Long updateTime, Long addTime) {
		this.category = category;
		this.goodsClassify = goodsClassify;
		this.goods = goods;
		this.store = store;
		this.barCode = barCode;
		this.name = name;
		this.title = title;
		this.categoryPath = categoryPath;
		this.status = status;
		this.atDiscount = atDiscount;
		this.atDiscountLocal = atDiscountLocal;
		this.atGift = atGift;
		this.atGiftLocal = atGiftLocal;
		this.unit = unit;
		this.selfCost = selfCost;
		this.price = price;
		this.stock = stock;
		this.stockConvert = stockConvert;
		this.stockEnd = stockEnd;
		this.sellDef = sellDef;
		this.sellMin = sellMin;
		this.sellExt = sellExt;
		this.originalPrice = originalPrice;
		this.dealAll = dealAll;
		this.dealWeek = dealWeek;
		this.dealMonth = dealMonth;
		this.dealTime = dealTime;
		this.sort = sort;
		this.updateTime = updateTime;
		this.addTime = addTime;
	}

	/** full constructor */
	public StoreGoods(Category category, GoodsClassify goodsClassify, Goods goods, Store store,
			String barCode, String name, String title, String subTitle, String keywords,
			String categoryPath, Integer status, Boolean atDiscount, Boolean atDiscountLocal,
			Boolean atGift, Boolean atGiftLocal, String unit, Float selfCost, Float price,
			Float stock, String sellUnit, Double unitConvert, Float stockConvert, Integer stockEnd,
			Float sellDef, Float sellMin, Float sellExt, Float originalPrice, String pic,
			String dispatch, Integer dealAll, Integer dealWeek, Integer dealMonth, Long dealTime,
			Long sort, String description, Long updateTime, Long addTime,
			Set<GoodsPromote> goodsPromotes, Set<GoodsGift> goodsGiftsForSellId,
			Set<StoreRestockGoods> storeRestockGoodses, Set<StoreGoodsPic> storeGoodsPics,
			Set<Shopping> shoppings, Set<LocalSaleGoods> localSaleGoodses,
			Set<GoodsGift> goodsGiftsForGiftId, Set<StoreGift> storeGifts,
			Set<GoodsStandard> goodsStandards) {
		this.category = category;
		this.goodsClassify = goodsClassify;
		this.goods = goods;
		this.store = store;
		this.barCode = barCode;
		this.name = name;
		this.title = title;
		this.subTitle = subTitle;
		this.keywords = keywords;
		this.categoryPath = categoryPath;
		this.status = status;
		this.atDiscount = atDiscount;
		this.atDiscountLocal = atDiscountLocal;
		this.atGift = atGift;
		this.atGiftLocal = atGiftLocal;
		this.unit = unit;
		this.selfCost = selfCost;
		this.price = price;
		this.stock = stock;
		this.sellUnit = sellUnit;
		this.unitConvert = unitConvert;
		this.stockConvert = stockConvert;
		this.stockEnd = stockEnd;
		this.sellDef = sellDef;
		this.sellMin = sellMin;
		this.sellExt = sellExt;
		this.originalPrice = originalPrice;
		this.pic = pic;
		this.dispatch = dispatch;
		this.dealAll = dealAll;
		this.dealWeek = dealWeek;
		this.dealMonth = dealMonth;
		this.dealTime = dealTime;
		this.sort = sort;
		this.description = description;
		this.updateTime = updateTime;
		this.addTime = addTime;
		this.goodsPromotes = goodsPromotes;
		this.goodsGiftsForSellId = goodsGiftsForSellId;
		this.storeRestockGoodses = storeRestockGoodses;
		this.storeGoodsPics = storeGoodsPics;
		this.shoppings = shoppings;
		this.localSaleGoodses = localSaleGoodses;
		this.goodsGiftsForGiftId = goodsGiftsForGiftId;
		this.storeGifts = storeGifts;
		this.goodsStandards = goodsStandards;
	}

	// Property accessors
	@SequenceGenerator(name = "generator", sequenceName = "SEQ_STORE_GOODS")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "STORE_GOODS_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getStoreGoodsId() {
		return this.storeGoodsId;
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		this.storeGoodsId = storeGoodsId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CAT_ID", nullable = false)
	public Category getCategory() {
		return this.category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CLASSIFY_ID", nullable = false)
	public GoodsClassify getGoodsClassify() {
		return this.goodsClassify;
	}

	public void setGoodsClassify(GoodsClassify goodsClassify) {
		this.goodsClassify = goodsClassify;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID", nullable = false)
	public Goods getGoods() {
		return this.goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "STORE_ID", nullable = false)
	public Store getStore() {
		return this.store;
	}

	public void setStore(Store store) {
		this.store = store;
	}

	@Column(name = "BAR_CODE", nullable = false, length = 20)
	public String getBarCode() {
		return this.barCode;
	}

	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}

	@Column(name = "NAME", nullable = false, length = 250)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "TITLE", nullable = false, length = 250)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "SUB_TITLE", length = 250)
	public String getSubTitle() {
		return this.subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}

	@Column(name = "KEYWORDS", length = 150)
	public String getKeywords() {
		return this.keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@Column(name = "CATEGORY_PATH", nullable = false, length = 100)
	public String getCategoryPath() {
		return this.categoryPath;
	}

	public void setCategoryPath(String categoryPath) {
		this.categoryPath = categoryPath;
	}

	@Column(name = "STATUS", nullable = false, precision = 2, scale = 0)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "AT_DISCOUNT", nullable = false, precision = 1, scale = 0)
	public Boolean getAtDiscount() {
		return this.atDiscount;
	}

	public void setAtDiscount(Boolean atDiscount) {
		this.atDiscount = atDiscount;
	}

	@Column(name = "AT_DISCOUNT_LOCAL", nullable = false, precision = 1, scale = 0)
	public Boolean getAtDiscountLocal() {
		return this.atDiscountLocal;
	}

	public void setAtDiscountLocal(Boolean atDiscountLocal) {
		this.atDiscountLocal = atDiscountLocal;
	}

	@Column(name = "AT_GIFT", nullable = false, precision = 1, scale = 0)
	public Boolean getAtGift() {
		return this.atGift;
	}

	public void setAtGift(Boolean atGift) {
		this.atGift = atGift;
	}

	@Column(name = "AT_GIFT_LOCAL", nullable = false, precision = 1, scale = 0)
	public Boolean getAtGiftLocal() {
		return this.atGiftLocal;
	}

	public void setAtGiftLocal(Boolean atGiftLocal) {
		this.atGiftLocal = atGiftLocal;
	}

	@Column(name = "UNIT", nullable = false, length = 20)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "SELF_COST", nullable = false, precision = 8)
	public Float getSelfCost() {
		return this.selfCost;
	}

	public void setSelfCost(Float selfCost) {
		this.selfCost = selfCost;
	}

	@Column(name = "PRICE", nullable = false, precision = 8)
	public Float getPrice() {
		return this.price;
	}

	public void setPrice(Float price) {
		this.price = price;
	}

	@Column(name = "STOCK", nullable = false, precision = 8, scale = 1)
	public Float getStock() {
		return this.stock;
	}

	public void setStock(Float stock) {
		this.stock = stock;
	}

	@Column(name = "SELL_UNIT", length = 20)
	public String getSellUnit() {
		return this.sellUnit;
	}

	public void setSellUnit(String sellUnit) {
		this.sellUnit = sellUnit;
	}

	@Column(name = "UNIT_CONVERT", precision = 8, scale = 1)
	public Double getUnitConvert() {
		return this.unitConvert;
	}

	public void setUnitConvert(Double unitConvert) {
		this.unitConvert = unitConvert;
	}

	@Column(name = "STOCK_CONVERT", nullable = false, precision = 8, scale = 1)
	public Float getStockConvert() {
		return this.stockConvert;
	}

	public void setStockConvert(Float stockConvert) {
		this.stockConvert = stockConvert;
	}

	@Column(name = "STOCK_END", nullable = false, precision = 8, scale = 0)
	public Integer getStockEnd() {
		return this.stockEnd;
	}

	public void setStockEnd(Integer stockEnd) {
		this.stockEnd = stockEnd;
	}

	@Column(name = "SELL_DEF", nullable = false, precision = 8, scale = 1)
	public Float getSellDef() {
		return this.sellDef;
	}

	public void setSellDef(Float sellDef) {
		this.sellDef = sellDef;
	}

	@Column(name = "SELL_MIN", nullable = false, precision = 8, scale = 1)
	public Float getSellMin() {
		return this.sellMin;
	}

	public void setSellMin(Float sellMin) {
		this.sellMin = sellMin;
	}

	@Column(name = "SELL_EXT", nullable = false, precision = 8, scale = 1)
	public Float getSellExt() {
		return this.sellExt;
	}

	public void setSellExt(Float sellExt) {
		this.sellExt = sellExt;
	}

	@Column(name = "ORIGINAL_PRICE", nullable = false, precision = 8)
	public Float getOriginalPrice() {
		return this.originalPrice;
	}

	public void setOriginalPrice(Float originalPrice) {
		this.originalPrice = originalPrice;
	}

	@Column(name = "PIC", length = 100)
	public String getPic() {
		return this.pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	@Column(name = "DISPATCH", length = 300)
	public String getDispatch() {
		return this.dispatch;
	}

	public void setDispatch(String dispatch) {
		this.dispatch = dispatch;
	}

	@Column(name = "DEAL_ALL", nullable = false, precision = 8, scale = 0)
	public Integer getDealAll() {
		return this.dealAll;
	}

	public void setDealAll(Integer dealAll) {
		this.dealAll = dealAll;
	}

	@Column(name = "DEAL_WEEK", nullable = false, precision = 8, scale = 0)
	public Integer getDealWeek() {
		return this.dealWeek;
	}

	public void setDealWeek(Integer dealWeek) {
		this.dealWeek = dealWeek;
	}

	@Column(name = "DEAL_MONTH", nullable = false, precision = 8, scale = 0)
	public Integer getDealMonth() {
		return this.dealMonth;
	}

	public void setDealMonth(Integer dealMonth) {
		this.dealMonth = dealMonth;
	}

	@Column(name = "DEAL_TIME", nullable = false, precision = 15, scale = 0)
	public Long getDealTime() {
		return this.dealTime;
	}

	public void setDealTime(Long dealTime) {
		this.dealTime = dealTime;
	}

	@Column(name = "SORT", nullable = false, precision = 15, scale = 0)
	public Long getSort() {
		return this.sort;
	}

	public void setSort(Long sort) {
		this.sort = sort;
	}

	@Column(name = "DESCRIPTION", length = 4000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "UPDATE_TIME", nullable = false, precision = 15, scale = 0)
	public Long getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Long updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "ADD_TIME", nullable = false, precision = 15, scale = 0)
	public Long getAddTime() {
		return this.addTime;
	}

	public void setAddTime(Long addTime) {
		this.addTime = addTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<GoodsPromote> getGoodsPromotes() {
		return this.goodsPromotes;
	}

	public void setGoodsPromotes(Set<GoodsPromote> goodsPromotes) {
		this.goodsPromotes = goodsPromotes;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoodsBySellId")
	public Set<GoodsGift> getGoodsGiftsForSellId() {
		return this.goodsGiftsForSellId;
	}

	public void setGoodsGiftsForSellId(Set<GoodsGift> goodsGiftsForSellId) {
		this.goodsGiftsForSellId = goodsGiftsForSellId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<StoreRestockGoods> getStoreRestockGoodses() {
		return this.storeRestockGoodses;
	}

	public void setStoreRestockGoodses(Set<StoreRestockGoods> storeRestockGoodses) {
		this.storeRestockGoodses = storeRestockGoodses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<StoreGoodsPic> getStoreGoodsPics() {
		return this.storeGoodsPics;
	}

	public void setStoreGoodsPics(Set<StoreGoodsPic> storeGoodsPics) {
		this.storeGoodsPics = storeGoodsPics;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<Shopping> getShoppings() {
		return this.shoppings;
	}

	public void setShoppings(Set<Shopping> shoppings) {
		this.shoppings = shoppings;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<LocalSaleGoods> getLocalSaleGoodses() {
		return this.localSaleGoodses;
	}

	public void setLocalSaleGoodses(Set<LocalSaleGoods> localSaleGoodses) {
		this.localSaleGoodses = localSaleGoodses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoodsByGiftId")
	public Set<GoodsGift> getGoodsGiftsForGiftId() {
		return this.goodsGiftsForGiftId;
	}

	public void setGoodsGiftsForGiftId(Set<GoodsGift> goodsGiftsForGiftId) {
		this.goodsGiftsForGiftId = goodsGiftsForGiftId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<StoreGift> getStoreGifts() {
		return this.storeGifts;
	}

	public void setStoreGifts(Set<StoreGift> storeGifts) {
		this.storeGifts = storeGifts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "storeGoods")
	public Set<GoodsStandard> getGoodsStandards() {
		return this.goodsStandards;
	}

	public void setGoodsStandards(Set<GoodsStandard> goodsStandards) {
		this.goodsStandards = goodsStandards;
	}

}